#include "rook.h"
#include "src/move.h"
#include "src/constants.h"

Rook::Rook( int x, int y, QString pixmap_path, int color, QGraphicsItem* parent ) : BoardFigure( x, y, pixmap_path, color, parent )
{
}

QList<Move*>& Rook::getPossibleMoves( BoardFigure* board[8][8] ) {
  qDebug() << "Rook GetPossibleMoves called";

  if ( possibleMovesReady ) return possibleMoves;

  int dx[] = {  0, 0, -1, 1 };
  int dy[] = { -1, 1,  0, 0 };

  generateMovesFromVectors( dx, dy, 4, board );
  
  possibleMovesReady = true;
  return possibleMoves;
}

